<layout name="layout"/>
<section class="content-header">
    <h1>
        菜单管理
    </h1>
</section>

<div class="content">
    <div class="box box-info">
        <div class="box-header with-border">
            <h3 class="box-title">搜索</h3>
        </div>
        <form id="form" action="" class="form-horizontal" method="post">
            <input style="display: none" value="{$entity.id}" name="id" id="id">

            <div class="box-body">
                <div class="form-group" required="required">
                    <label class="col-sm-2 control-label">所属应用</label>

                    <div class="col-sm-6">
                        <select name="appid" id="appid" class="form-control">
                            <option
                            <empty name="entity.parentid"> selected="selected"</empty>
                            value="NULL">请选择</option>
                            <volist name="apps" id="vo">
                                <option

                                <assign name="vid" value="$entity.appid" />
                                <assign name="oid" value="$vo.id" />

                                <if condition="$vid eq $oid">selected="selected"</if>
                                value="{$vo.id}">{$vo.name}</option>
                            </volist>

                        </select>
                    </div>
                </div>
                <div class="form-group" required="required">
                    <label class="col-sm-2 control-label">上级菜单</label>

                    <div class="col-sm-6">
                        <select name="parentid" id="parentid" class="form-control">
                            <option
                            <empty name="entity.parentid"> selected="selected"</empty>
                            value="NULL">请选择</option>
                            <volist name="menus" id="vo">
                                <option

                                <assign name="vid" value="$entity.parentid" />
                                <assign name="oid" value="$vo.id" />

                                <if condition="$vid eq $oid">selected="selected"</if>
                                value="{$vo.id}">{$vo.name}</option>
                            </volist>

                        </select>
                    </div>
                </div>
                <div class="form-group" required="required" required="required">
                    <label class="col-sm-2 control-label">菜单名称</label>

                    <div class="col-sm-6">
                        <input value="{$entity.name}" class="form-control" name="name" id="name">
                    </div>
                </div>
                <div class="form-group" required="required" required="required">
                    <label class="col-sm-2 control-label">URL</label>

                    <div class="col-sm-6">
                        <input value="{$entity.url}" class="form-control" name="url" id="url">
                    </div>
                </div>
                <div class="form-group" >
                    <label class="col-sm-2 control-label">菜单图标</label>

                    <div class="col-sm-6">
                        <input value="{$entity.icon}" class="form-control" name="icon" id="icon">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">排序</label>

                    <div class="col-sm-6">
                        <input value="{$entity.orders}" class="form-control" name="orders" id="orders">
                    </div>
                </div>
                <div class="form-group" required="required">
                    <label class="col-sm-2 control-label">是否展示</label>

                    <div class="col-sm-6">
                        <select name="display" id="display" class="form-control">
                            <option  <if condition="$entity.display eq 1">selected="selected"</if> value="1">是</option>
                            <option <if condition="$entity.display eq 0">selected="selected"</if> value="0">否</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="box-footer">
                <a href="javascript:void(0)" onclick="commonSubmit('form','__APP__/home/menu/{$action}','')"
                   class="btn btn-primary pull-right" style="margin-left: 5px">提交</a>
                <a href="__APP__/home/menu" class="btn btn-default  pull-right">返回</a>
            </div>
            <!-- /.box-footer -->
        </form>
    </div>
</div>

